package com.bwf.buffer;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

/**
 * @Version v1.0
 * @Description: TODO
 * @Author ZHANZHONGXIN
 * @Date 2022/5/17 14:17
 * @Copyright 博为峰
 */
public class BufferedWriterDemo {
    public static void main(String[] args) {

        try (FileWriter fileWriter = new FileWriter("bw.txt");
             BufferedWriter bufferedWriter = new BufferedWriter(fileWriter)) {
            bufferedWriter.write("abc");
            bufferedWriter.newLine();
            bufferedWriter.write("123");
        } catch (IOException e) {

        }

        //复制C:\Users\admin\Desktop\22\xxx文件到C:\Users\admin\Desktop\22\copy\

    }
}
